import request from '@/utils/request'

export function getList (params) {
  return request({
    url: '/product/list',
    method: 'get',
    params
  })
}

export function getRead (params) {
  return request({
    url: '/product/read',
    method: 'get',
    params
  })
}


export function changeStatus (params) {
  return request({
    url: '/product/change/status',
    method: 'post',
    data: params
  })
}

export function getModeList (params) {
  return request({
    url: '/product/mode',
    method: 'get',
    params
  })
}

export function getCategoryList (params) {
  return request({
    url: '/product/category/list',
    method: 'get',
    params
  })
}

export function getMaterialList (params) {
  return request({
    url: '/product/material',
    method: 'get',
    params
  })
}

export function getPopularList (params) {
  return request({
    url: '/product/popular',
    method: 'get',
    params
  })
}

export function addData (params) {
  return request({
    url: '/product/add',
    method: 'post',
    data: params
  })
}


export function editData (params) {
  return request({
    url: '/product/edit',
    method: 'post',
    data: params
  })
}